package decorator;

import java.math.BigDecimal;

/**
 * 4. 装饰者实现类1
 */
public class CakeAddGrapeDecorator extends CakeDecorator{
    public CakeAddGrapeDecorator(Cake cake) {
        super(cake);
    }

    @Override
    public String getCakeMsg() {
        return super.getCakeMsg() + "加葡萄";
    }

    @Override
    public BigDecimal getPrice() {
        return super.getPrice().add(new BigDecimal("10"));
    }
}
